using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using TVDesigner.GUI.Elements;

namespace TVDesigner.GUI.Controls
{
    public partial class ListPropertyPanel : UserControl
    {
        private FMain _MainForm;
        private DiagramPanel _FocusDiagram;
        private Element _FocusElement;

        public ListPropertyPanel()
        {
            InitializeComponent();
        }

        #region Propriedades

        public FMain MainForm
        {
            get { return _MainForm; }
            set
            {
                _DiagramsList.MainForm = value;
                _MainForm = value;
            }
        }

        public Element FocusElement
        {
            get { return _FocusElement; }
            set
            {
                _PropertyPanel.FocusElement = value;
                _FocusElement = value;
            }
        }

        public DiagramPanel FocusDiagram
        {
            get { return _FocusDiagram; }
            set
            {
                _FocusDiagram = value;
                _PropertyPanel.FocusDiagram = value;
            }
        } 
        #endregion

        public void ReloadCombo()
        {
            _PropertyPanel.ReloadCombo();
        }

        public void NewProject()
        {
            _DiagramsList.NewProject();
        }

        public void OpenProject()
        {
            _DiagramsList.OpenProject();
        }

        public void CloseProject()
        {
            _DiagramsList.CloseProject();
        }

        public void RemoveDiagram(TVDesigner.Entities.Elements.Screen screen)
        {
            _DiagramsList.RemoveDiagram(screen);
        }
    }
}
